package com.zhang.controller;

import com.zhang.propertise.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//@Controller
@RestController
@RequestMapping("/hello")
public class HelloController {

//    @Value("${cupSize}")
//    private String cupSize;

//    @Value("${content}")
//    private String content;

//    @Value("${age}")
//    private int age;

    @Autowired
    private GirlProperties girlProperties;
    // @RequestMapping(value = {"/say/{id}", "/hi"}, method = RequestMethod.POST)
    @GetMapping(value = "/say/{id}")
    public String say(@PathVariable("id") Integer id, @RequestParam(value = "id2", required = false, defaultValue = "0") Integer id2) {
        // return cupSize + age;
        // return content;
        // return girlProperties.getCupSize();
        return "id: " + id + ", id2: " + id2;
    }
}
